﻿
using EA.BA;
using EA.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace EAClient
{
    public partial class Default : WebPage
    {
        override
        protected void Load(object sender, EventArgs e)
        {
            ProductBA productBA = new ProductBA();
            List<ProductTO> listNewestProduct = productBA.GetNewestListProduct(6);
            List<ProductTO> listPopularProduct = productBA.GetPopularListProduct(6);
            List<ProductTO> listFavouriteProduct = productBA.GetFavouriteListProduct(6);
            List<ProductTO> listCatProductTabOne = productBA.GetListProductByCategory(6,1);
            List<ProductTO> listCatProductTabTwo = productBA.GetListProductByCategory(6, 2);
            List<ProductTO> listCatProductTabThree = productBA.GetListProductByCategory(6, 3);
            List<ProductTO> listCatProductTabFour = productBA.GetListProductByCategory(6, 4);
            List<ProductTO> listBestCatProduct = productBA.GetListProductByCategoryAndRating(6, 12);
            this.Attributes.Add("listNewestProduct", listNewestProduct);
            this.Attributes.Add("listPopularProduct", listPopularProduct);
            this.Attributes.Add("listFavouriteProduct", listFavouriteProduct);
            this.Attributes.Add("listCatProductTabOne", listCatProductTabOne);
            this.Attributes.Add("listCatProductTabTwo", listCatProductTabTwo);
            this.Attributes.Add("listCatProductTabThree", listCatProductTabThree);
            this.Attributes.Add("listCatProductTabFour", listCatProductTabFour);
            this.Attributes.Add("listBestCatProduct", listBestCatProduct);
        }
    }
}